<?php

/**
 * Library.php
 *
 * Holds class Library
 *
 * @package Library
 */

/**
 * Library
 *
 * Library bootstrap class
 *
 * @package Library
 */
final class Library {

	/**
	 * Constructor
	 *
	 * @return void
	 */
	public function __construct() {
		spl_autoload_register(array($this, 'load'));
		//Util::dummy();
	}

	/**
	 * Library autoloader
	 *
	 * @param string $class
	 * @return boolean
	 */
	public static function load($class) {
		$file = rtrim(dirname(__FILE__), '\\/' . DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . str_replace('_', DIRECTORY_SEPARATOR, $class) . '.php';
		if(file_exists($file)) {
			require_once $file;
			return true;
		}
		return false;
	}

}
